window.onload=function(){
    $('.kh_changename').click(function(){
        let namevalue=$('.kh_in').value()
        console.log(namevalue.length);
        if(namevalue.length<5||namevalue.length>24){
            $('.kh_tips').html(`<span class='kh_color'>请输入5-24个字符</span>`)
        }else{
            $('.kh_tips').html(`用户名只能修改一次（5-24字符之间）`)
            window.location.href=`/pages/uesr/uesr.html?newname=${namevalue}`
            window.localStorage.setItem('newname',namevalue)
        }
        
    })
}